home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / source / dflt19 / dflat.doc < prev    next >
Encoding:
Text File  |  1994-05-19  |  50.0 KB  |  1,339 lines

  1. Window Classes:
  2.  
  3. Window classes define the behavior of windows. Each class has its own
  4. unique reaction to messages. Classes derive from other classes.
  5.  
  6.     NORMAL       base window for all window classes
  7.     APPLICATION  application window. has the menu 
  8.                  (derived from NORMAL)
  9.     TEXTBOX      textbox. base window for listbox, editbox, etc.
  10.                  (derived from NORMAL)
  11.     LISTBOX      listbox. base window for menubar
  12.                  (derived from TEXTBOX)
  13.     PICTUREBOX   picturebox. a text box onto which you can draw lines
  14.                  (derived from TEXTBOX)
  15.     EDITBOX      editbox
  16.                  (derived from TEXTBOX)
  17.     MENUBAR      the application's menu bar
  18.                  (derived from NORMAL)
  19.     POPDOWNMENU  popdown menu
  20.                  (derived from LISTBOX)
  21.     BUTTON       command button in a dialog box
  22.                  (derived from TEXTBOX)
  23.     SPINBUTTON   spin button in a dialog box
  24.                  (derived from LISTBOX)
  25.     COMBOBOX     combination editbox/listbox
  26.          (derived from EDITBOX)
  27.     DIALOG       dialog box. parent to editbox, button, listbox, etc.
  28.                  (derived from NORMAL)
  29.     ERRORBOX     for displaying an error message
  30.                  (derived from DIALOG)
  31.     MESSAGEBOX   for displaying a message
  32.                  (derived from DIALOG)
  33.     HELPBOX      help window
  34.                  (derived from DIALOG)
  35.     TEXT         static text on a dialog box
  36.                  (derived from TEXTBOX)
  37.     RADIOBUTTON  radio button on a dialog box
  38.                  (derived from TEXTBOX)
  39.     CHECKBOX     check box on a dialog box
  40.                  (derived from TEXTBOX)
  41.     STATUSBAR    status bar at the bottom of application window
  42.                  (derived from TEXTBOX)
  43.  
  44.                D-Flat Window Class Tree
  45.     ┌─────────────────────────────────────────────┐
  46.     │                                             │
  47.     │      NORMAL                                 │
  48.     │        │                                    │
  49.     │        ├── APPLICATION                      │
  50.     │        │                                    │
  51.     │        ├── MENUBAR                          │
  52.     │        │                                    │
  53.     │        ├── TEXTBOX                          │
  54.     │        │      │                             │
  55.     │        │      ├── LISTBOX                   │
  56.     │        │      │      │                      │
  57.     │        │      │      ├──── POPDOWNMENU      │
  58.     │        │      │      │                      │
  59.     │        │      │      └──── SPINBUTTON       │
  60.     │        │      │                             │
  61.     │        │      ├── EDITBOX                   │
  62.     │        │      │      │                      │
  63.     │        │      │      └──── COMBOBOX         │
  64.     │        │      │                             │
  65.     │        │      ├── PICTUREBOX                │
  66.     │        │      │                             │
  67.     │        │      ├── STATUSBAR                 │
  68.     │        │      │                             │
  69.     │        │      ├── TEXT                      │
  70.     │        │      │                             │
  71.     │        │      ├── BUTTON                    │
  72.     │        │      │                             │
  73.     │        │      ├── RADIOBUTTON               │
  74.     │        │      │                             │
  75.     │        │      └── CHECKBOX                  │
  76.     │        │                                    │
  77.     │        └── DIALOG                           │
  78.     │              │                              │
  79.     │              ├── ERRORBOX                   │
  80.     │              │                              │
  81.     │              ├── MESSAGEBOX                 │
  82.     │              │                              │
  83.     │              └── HELPBOX                    │
  84.     │                                             │
  85.     └─────────────────────────────────────────────┘
  86.  
  87.  
  88. Window Attributes:
  89.  
  90. Every window has an attribute word that defines some of its
  91. appearance and behavior. The following values are bitwise flags that
  92. OR together to make a window's attributes.
  93.  
  94. You can establish default attributes for a window's class, add
  95. additional attributes when you create the window, and use the
  96. AddAttribute, ClearAttribute, and TestAttribute macros to change and
  97. test a window's attributes.
  98.  
  99.     SHADOW       has a shadow
  100.     MOVEABLE     can move the window with mouse or cursor
  101.     SIZEABLE     can resize the window with mouse or cursor
  102.     HASMENUBAR   has a menubar (an application window)
  103.     VSCROLLBAR   has a vertical scroll bar
  104.     HSCROLLBAR   has a horizontal scroll bar
  105.     VISIBLE      is visible
  106.     SAVESELF     saves its own video memory
  107.     TITLEBAR     has a title bar 
  108.     CONTROLBOX   has a control box and control menu
  109.     MINMAXBOX    has a min/max box 
  110.     NOCLIP       is not clipped to its parent's borders
  111.     READONLY     is a readonly textbox
  112.     MULTILINE    is a multiline editbox or listbox
  113.     HASBORDER    has a border
  114.     HASSTATUSBAR has a statusbar (application window only)
  115.  
  116. Messages:
  117.  
  118. A D-Flat program is message-driven. You initiate message processing
  119. with the init_messages function, create a window with the
  120. CreateWindow function, and go into the message dispatching loop with
  121. the dispatch_message function. 
  122.  
  123. A window can have a window-processing function. When the user causes
  124. events to occur by pressing keys and using the mouse, D-Flat sends
  125. messages to the window's function. That function can send messages to
  126. itself and other windows with the SendMessage and PostMessage
  127. functions.
  128.  
  129. Windows are declared as members of a class. Every class has a default
  130. window-processing function. If you do not provide one for an instance
  131. of a window class, the default one receives messages for the window.
  132. Your custom window-processing function--if one exists--should chain to
  133. the default window-processing function for the blass by calling the
  134. DefaultWndProc function.
  135.  
  136. There are five things a window-processing function can do with a
  137. message:
  138.   - ignore it and let the D-Flat default processing occur.
  139.   - suppress it by returning without chaining to the default
  140.     window-processing function for the window class.
  141.   - chain to the default window-processing function and then do some
  142.     additional processing.
  143.   - do some preliminary processing and then chain to the default
  144.     window-processing function.
  145.   - do all the processing of the message and then return without 
  146.     chaining to the default window-processing function for the 
  147.     window class.
  148.  
  149. Following are the messages that an application program would use.
  150. There are other messages, but they are used by D-Flat only.
  151.  
  152. Process Communication Messages  
  153.  
  154. START                  start message processing (not used now)
  155.   Sent:    
  156.   P1:      
  157.   P2:      
  158.   Returns: 
  159.  
  160. STOP                   stop message processing        
  161.   Sent:    by application window to NULL to stop message 
  162.            dispatch loop
  163.   P1:      
  164.   P2:      
  165.   Returns: 
  166.  
  167. COMMAND                send a command to a window
  168.   Sent:    to send command
  169.   P1:      command code (commands.h)
  170.   P2:      additional data (command-dependent)
  171.            If the command code is a menu selection, P2 is the
  172.            position of the selection on the menu (1,2,...)
  173.            If the command code is a dialog box control, P2 is
  174.            ENTERFOCUS when the command gets the focus, LEAVEFOCUS
  175.            when the command loses the focus, and 0 when the user
  176.            executes the control's command, e.g. presses a button.
  177.   Returns: Nothing if sent by PostCommand
  178.            Command-dependent value if sent by SendCommand
  179.  
  180.  
  181. Window Management Messages  
  182.  
  183. CREATE_WINDOW          create a window                
  184.   Sent:    by DFLAT to new window after window is created
  185.   P1:      
  186.   P2:      
  187.   Returns: 
  188.  
  189. SHOW_WINDOW            show a window                  
  190.   Sent:    by the app to the window to display the window
  191.   P1:      
  192.   P2:      
  193.   Returns: 
  194.  
  195. HIDE_WINDOW            hide a window                  
  196.   Sent:    by the app to the window to hide the window
  197.   P1:      
  198.   P2:      
  199.   Returns: 
  200.  
  201. CLOSE_WINDOW           delete a window                
  202.   Sent:    by the app to destroy a window
  203.   P1:      
  204.   P2:      
  205.   Returns: 
  206.  
  207. SETFOCUS               set and clear the focus        
  208.   Sent:    by D-Flat or the app to set or release the focus
  209.   P1:      true = set, false = release
  210.   P2:      
  211.   Returns: 
  212.  
  213. PAINT                  paint the window's data space  
  214.   Sent:    to paint the client area of a window
  215.   P1:      address of RECT relative to window (0/0 = upper left) 
  216.            to paint or 0 to paint entire client area
  217.   P2:      True to make non-focus window paint without clipping
  218.   Returns: 
  219.  
  220. BORDER                 paint the window's border      
  221.   Sent:    to paint a window's border
  222.   P1:      address of RECT relative to window (0/0 = upper left) 
  223.            to paint or 0 to paint entire border
  224.   P2:      
  225.   Returns: FALSE to suppress D-Flat title display 
  226.            (e.g. the window displays its own border)
  227.  
  228. TITLE                  display the window's title     
  229.   Sent:    by D-Flat when it is about to display a window's title
  230.   P1:      address of RECT relative to window (0/0 = upper left) 
  231.            to paint or 0 to paint entire title
  232.   P2:      
  233.   Returns: FALSE to suppress D-Flat title display 
  234.            (e.g. the window displays its own title)
  235.  
  236. MOVE                   move the window                
  237.   Sent:    to move a window
  238.   P1:      new left coordinate
  239.   P2:      new upper coordinate
  240.   Returns: 
  241.  
  242. SIZE                   change the window's size       
  243.   Sent:    to resize a window
  244.   P1:      new right coordinate
  245.   P2:      new lower coordinate
  246.   Returns: 
  247.  
  248. MAXIMIZE               maximize the window            
  249.   Sent:    to maximize a window within its parent's client area
  250.   P1:      
  251.   P2:      
  252.   Returns: 
  253.  
  254. MINIMIZE               minimize the window            
  255.   Sent:    to minimize a window to an icon 
  256.   P1:      
  257.   P2:      
  258.   Returns: 
  259.  
  260. RESTORE                restore the window             
  261.   Sent:    to restore a window to its position and size prior to the
  262.            maximize or minimize operation
  263.   P1:      
  264.   P2:      
  265.   Returns: 
  266.  
  267. INSIDE_WINDOW          test x/y inside a window       
  268.   Sent:    to test to see if coordinates are inside a window
  269.   P1:      x
  270.   P2:      y
  271.   Returns: true or false
  272.  
  273.  
  274. Clock Messages  
  275.  
  276. CLOCKTICK              the clock ticked               
  277.   Sent:    every second to a window that has captured the clock
  278.   P1:      segment of time display string
  279.   P2:      offset of time display string
  280.   Returns: 
  281.  
  282. CAPTURE_CLOCK          capture clock into a window    
  283.   Sent:    to capture the clock. To chain clock ticks, send this
  284.            message to wnd->PrevClock when you receive the message.
  285.   P1:      
  286.   P2:      
  287.   Returns: 
  288.  
  289. RELEASE_CLOCK          release clock to the system    
  290.   Sent:    to release the captured clock
  291.   P1:      
  292.   P2:      
  293.   Returns: 
  294.  
  295.  
  296. Keyboard and Screen Messages  
  297.  
  298. KEYBOARD               key was pressed                
  299.   Sent:    when key is pressed. sent to the window that has the focus 
  300.   P1:      keystroke
  301.   P2:      shift key mask
  302.   Returns: 
  303.  
  304. CAPTURE_KEYBOARD       capture keyboard into a window 
  305.   Sent:    by window to itself to capture the keyboard 
  306.            regardless of focus
  307.   P1:      
  308.   P2:      
  309.   Returns: 
  310.  
  311. RELEASE_KEYBOARD       release keyboard to system     
  312.   Sent:    by window to itelf to release the captured keyboard
  313.   P1:      
  314.   P2:      
  315.   Returns: 
  316.  
  317. KEYBOARD_CURSOR        position the keyboard cursor   
  318.   Sent:    to position the keyboard cursor
  319.   P1:      x (if sent by window, 0 = left client area)
  320.   P2:      y (if sent by window, 0 = top client area)
  321.            if sent with NULL, x/y are relative to the screen
  322.   Returns: 
  323.  
  324. CURRENT_KEYBOARD_CURSOR    read the cursor position
  325.   Sent:    to retrieve the cursor position
  326.   P1:      x (relative to the screen)
  327.   P2:      y (relative to the screen)
  328.   Returns: 
  329.  
  330. HIDE_CURSOR            hide the keyboard cursor       
  331.   Sent:    to hide the keyboard cursor
  332.   P1:      
  333.   P2:      
  334.   Returns: 
  335.  
  336. SHOW_CURSOR            display the keyboard cursor    
  337.   Sent:    to display the keyboard cursor
  338.   P1:      
  339.   P2:      
  340.   Returns: 
  341.  
  342. SAVE_CURSOR            save the cursor's configuration
  343.   Sent:    to save the keyboard cursor's current configuration 
  344.   P1:      
  345.   P2:      
  346.   Returns: 
  347.  
  348. RESTORE_CURSOR         restore the saved cursor       
  349.   Sent:    to restore a keyboard cursor's saved configuration 
  350.   P1:      
  351.   P2:      
  352.   Returns: 
  353.  
  354. SHIFT_CHANGED          the shift status changed       
  355.   Sent:    to in-focus window when the user presses or 
  356.            releases shift, alt, or ctrl key
  357.   P1:      BIOS shift key mask
  358.   P2:      
  359.   Returns: 
  360.  
  361. WAITKEYBOARD            wait for key release
  362.   Sent:    to wait for a keypress release
  363.   P1:
  364.   P2:      
  365.   Returns: 
  366.  
  367.  
  368. Mouse Messages  
  369.  
  370. RESET_MOUSE            reset the mouse
  371.   Sent:    to reset the mouse to the current screen configuration
  372.   P1:
  373.   P2:      
  374.   Returns: 
  375.  
  376. MOUSE_TRAVEL        set the mouse's travel
  377.   Sent:    to limit the mouse travel to a screen rectangle
  378.   P1:      address of a RECT
  379.   P2:      
  380.   Returns: 
  381.  
  382. MOUSE_INSTALLED        test for mouse installed       
  383.   Sent:    to see if the mouse is installed
  384.   P1:      
  385.   P2:      
  386.   Returns: true or false
  387.  
  388. RIGHT_BUTTON           right button pressed           
  389.   Sent:    to window when the user presses the right button
  390.            (sent only when mouse cursor is within the window
  391.             or the window has captured the mouse)
  392.   P1:      x
  393.   P2:      y
  394.   Returns: 
  395.  
  396. LEFT_BUTTON            left button pressed            
  397.   Sent:    to window when the user presses the left button
  398.            (sent only when mouse cursor is within the window
  399.             or the window has captured the mouse)
  400.   P1:      x
  401.   P2:      y
  402.   Returns: 
  403.  
  404. DOUBLE_CLICK           left button doubleclicked    
  405.   Sent:    to window when the user double-clicks the left button
  406.            (sent only when mouse cursor is within the window
  407.             or the window has captured the mouse)
  408.            (a LEFT_BUTTON message will have preceded this one)
  409.   P1:      x
  410.   P2:      y
  411.   Returns: 
  412.  
  413. MOUSE_MOVED            mouse changed position         
  414.   Sent:    to window when the mouse has moved
  415.            (sent only when mouse cursor is within the window
  416.             or the window has captured the mouse)
  417.   P1:      x
  418.   P2:      y
  419.   Returns: 
  420.  
  421. BUTTON_RELEASED        mouse button released          
  422.   Sent:    to window when user releases mouse button
  423.            (sent only when mouse cursor is within the window
  424.             or the window has captured the mouse)
  425.   P1:      x
  426.   P2:      y
  427.   Returns: 
  428.  
  429. CURRENT_MOUSE_CURSOR   get mouse position             
  430.   Sent:    to determine the current mouse position
  431.   P1:      address of x
  432.   P2:      address of y
  433.   Returns: mouse coordinates in x and y. If no mouse is installed,
  434.            returns -1 in x and y.
  435.  
  436. MOUSE_CURSOR           set mouse position             
  437.   Sent:    to set the current mouse position
  438.   P1:      x
  439.   P2:      y
  440.   Returns: 
  441.  
  442. SHOW_MOUSE             make mouse cursor visible      
  443.   Sent:    to display the mouse cursor
  444.   P1:      
  445.   P2:      
  446.   Returns: 
  447.  
  448. HIDE_MOUSE             hide mouse cursor              
  449.   Sent:    to hide the mouse cursor
  450.   P1:      
  451.   P2:      
  452.   Returns: 
  453.  
  454. WAITMOUSE              wait until button released     
  455.   Sent:    to wait until the user releases the mouse button
  456.   P1:      
  457.   P2:      
  458.   Returns: 
  459.  
  460. TESTMOUSE              test any mouse button pressed  
  461.   Sent:    to see if either mouse button is pressed
  462.   P1:      
  463.   P2:      
  464.   Returns: true or false
  465.  
  466. CAPTURE_MOUSE          capture mouse into a window    
  467.   Sent:    by/to a window to capture all mouse activity 
  468.            regardless of whether it occurs inside this window
  469.   P1:      
  470.   P2:      
  471.   Returns: 
  472.  
  473. RELEASE_MOUSE          release the mouse to system    
  474.   Sent:    release a captured mouse
  475.   P1:      
  476.   P2:      
  477.   Returns: 
  478.  
  479.  
  480. Text Box Messages  
  481.  
  482. ADDTEXT                add text to the text box       
  483.   Sent:    to append a line of text to the text box
  484.   P1:      address of null-terminated string without \n
  485.            (textbox makes its own copy. string can go out of scope.)
  486.   P2:      
  487.   Returns: 
  488.  
  489. DELETETEXT         delete line of text from the text box       
  490.   Sent:    to append a line of text to the text box
  491.   P1:      line number relative to zero
  492.   P2:      
  493.   Returns: 
  494.  
  495. INSERTTEXT           insert line of text into the text box       
  496.   Sent:    to insert a line of text into the text box
  497.   P1:      address of null-terminated string without \n
  498.   P2:      line number relative to zero that will follow new line.
  499.   Returns: 
  500.  
  501. CLEARTEXT              clear the text box             
  502.   Sent:    clear all text from the text box
  503.   P1:      
  504.   P2:      
  505.   Returns: 
  506.  
  507. SETTEXT                set text buffer contents
  508.   Sent:    To set text buffer to caller's text.
  509.   P1:      address of text buffer
  510.            (lines are terminated by \n without \0)
  511.            (textbox makes its own copy. string can go out of scope.)
  512.   P2:      length of text buffer
  513.   Returns: 
  514.  
  515. SCROLL                 vertical scroll of text box    
  516.   Sent:    to scroll a text window vertically one line
  517.   P1:      true = scroll up, false = scroll down
  518.   P2:
  519.   Returns: 
  520.  
  521. HORIZSCROLL            horizontal scroll of text box 
  522.   Sent:    to scroll a text window horizontally one column
  523.   P1:      true = scroll left, false = scroll right
  524.   P2:
  525.   Returns: 
  526.  
  527. SCROLLPAGE             vertical scroll of text box 1 page
  528.   Sent:    to scroll a text window vertically one page
  529.   P1:      true = scroll up, false = scroll down
  530.   P2:
  531.   Returns: 
  532.  
  533. HORIZSCROLLPAGE        horizontal scroll of text box 1 page
  534.   Sent:    to scroll a text window horizontally one page
  535.   P1:      true = scroll left, false = scroll right
  536.   P2:
  537.   Returns: 
  538.  
  539. SCROLLDOC             document scroll of text box
  540.   Sent:    to scroll a text window to beginning/end of document
  541.   P1:      true = scroll to beginning, false = scroll to end
  542.   P2:
  543.   Returns: 
  544.  
  545. Edit Box Messages  
  546.  
  547. GETTEXT             get text from an edit box      
  548.   Sent:    Get the line of text from a single-line editbox
  549.   P1:      address of receiving buffer
  550.   P2:      max length to copy
  551.   Returns: 
  552.  
  553. SETTEXTLENGTH        set maximum text length in an edit box      
  554.   Sent:    to set the maximum number of characters that an editbox
  555.            may hold in its buffer.
  556.   P1:      maximum character count
  557.   P2:      
  558.   Returns: 
  559.  
  560.  
  561. Application Window Messages
  562.  
  563. ADDSTATUS               write text to the status bar
  564.   Sent:    to write to or clear status bar text area
  565.   P1:      address of text (null-terminated string) or NULL to clear
  566.   P2:      
  567.   Returns: 
  568.  
  569. List Box Messages  
  570.  
  571. LB_SELECTION               list box selection
  572.   Sent:    sent by list box to self and to parent (if parent is not
  573.            a simple LISTBOX window) when user moves to an entry on 
  574.            the list box.
  575.   P1:      selection number: 0, 1, ...
  576.   P2:      if multi-line selection listbox, shift status mask
  577.            if not, true = selection was same as choice (e.g. mouse)
  578.   Returns: 
  579.  
  580. LB_CHOOSE               list box choice        
  581.   Sent:    sent to parent of list box when user chooses an item 
  582.            from the list box
  583.   P1:      selection number: 0, 1, ...
  584.   P2:      
  585.   Returns: 
  586.  
  587. LB_CURRENTSELECTION    return the current selection   
  588.   Sent:    To get the current selection number (where the listbox
  589.            cursor is positioned)
  590.   P1:      
  591.   P2:      
  592.   Returns: selection number: 0, 1, ...
  593.  
  594. LB_GETTEXT             return the text of selection   
  595.   Sent:    To get a copy of the text at a specified line
  596.   P1:      Address of string to receive copy of text
  597.   P2:      Line number: 0, 1, ...
  598.   Returns: 
  599.  
  600. LB_SETSELECTION        sets the listbox selection     
  601.   Sent:    To change where the listbox cursor points
  602.   P1:      Line number: 0, 1, ...
  603.   P2:      
  604.   Returns: 
  605.  
  606. Picture Box Messages
  607.  
  608. DRAWVECTOR           Draws a vector
  609.   Sent:    To draw a vector in the window's client area
  610.   P1:      address of RECT that describes the vector relative to the
  611.            window's client area
  612.            (either lf = rt [vertical vector] or tp = bt [horizontal
  613.            vector])
  614.   P2:      
  615.   Returns: 
  616.  
  617. DRAWBOX             Draws a box
  618.   Sent:    To draw a box in the window's client area
  619.   P1:      address of RECT that describes the box relative to the
  620.            window's client area
  621.   P2:      
  622.   Returns: 
  623.  
  624. DRAWBAR             Draws a barchart bar
  625.   Sent:    To draw a bar in the window's client area
  626.   P1:      address of RECT that describes the bar relative to the
  627.            window's client area
  628.            (either lf = rt [vertical vector] or tp = bt [horizontal
  629.            vector])
  630.   P2:      one of these: SOLIDBAR, HEAVYBAR, CROSSBAR, LIGHTBAR
  631.              (4 different bar textures)
  632.   Returns: 
  633.  
  634. =====================================================
  635.  
  636. API Functions & Macros:
  637.  
  638. These are functions and macros defined for use by applications
  639. programs. There are many others defined in the header files. These
  640. others are for D-Flat to use, and programmers need not be concerned
  641. about them except as an expression of their curiosity about how
  642. D-Flat works.
  643.  
  644.  
  645. (Note: These specifications are not in any orderly sequence yet.)
  646.  
  647.  
  648. -------------------------------------------------------------------
  649. void init_messages(void)
  650.  
  651. Call this function first to initialize message processing. Continue
  652. only if the function returns a true value. Otherwise, terminate the
  653. processing of your program. A false return occurs from a longjmp that
  654. is executed when D-Flat attempts to allocate memory that is not
  655. available.
  656.  
  657. -------------------------------------------------------------------
  658. WINDOW CreateWindow(
  659.     CLASS class,              /* class of this window       */
  660.     char *ttl,                /* title or NULL              */
  661.     int left, int top,        /* upper left coordinates     */
  662.     int height, int width,    /* dimensions                 */
  663.     void *extension,          /* pointer to additional data */
  664.     WINDOW parent,            /* parent of this window      */
  665.     int (*wndproc)(struct window *,MESSAGE,PARAM,PARAM),
  666.     int attrib)               /* window attribute           */
  667.  
  668. This function creates a window. It returns the WINDOW handle that
  669. messages and functions use to identify the window. If you specify
  670. NULL for the parent, the APPLICATION window becomes the parent.
  671.  
  672. -------------------------------------------------------------------
  673. void PostMessage(WINDOW wnd, MESSAGE msg, PARAM p1, PARAM p2)
  674.  
  675. Post a message to a window. The window will receive the message in
  676. turn during the message-dispatching loop.
  677.  
  678. -------------------------------------------------------------------
  679. int SendMessage(WINDOW wnd, MESSAGE msg, PARAM p1, PARAM p2)
  680.  
  681. Send a message to a window. The window will receive the message
  682. immediately. Control returns to the sender after the window has
  683. processed the message. The window can return an integer value.
  684.  
  685. This function can send system messages to NULL. System messages
  686. are ones that D-Flat processes without regard to a particular window.
  687. -------------------------------------------------------------------
  688. int dispatch_message(void)
  689.  
  690. The message dispatching loop. After opening the first window (usually
  691. the applications window), continue to call this function until it
  692. returns a FALSE value.
  693. -------------------------------------------------------------------
  694. void handshake(void)
  695.  
  696. This function dispatches messages without allowing any keyboard or
  697. click events to pass through. You use it to allow the clock to run or
  698. the watch icon to move during a lengthy process without allowing
  699. anything to execute a command that might interfere with what your
  700. program is doing.
  701.  
  702. -------------------------------------------------------------------
  703. int TestCriticalError(void)
  704.  
  705. -------------------------------------------------------------------
  706. int DefaultWndProc(WINDOW wnd, MESSAGE msg, PARAM p1, PARAM p2)
  707.  
  708. Call this from a window-processing function to chain to the default
  709. window-processing function for the window's class.
  710.  
  711. -------------------------------------------------------------------
  712. int BaseWndProc(CLASS class, WINDOW wnd, MESSAGE msg, PARAM p1, PARAM p2)
  713.  
  714. Call this from the window-processing function of a derived window
  715. class to chain to the window-processing function of the base window's
  716. class.
  717.  
  718. -------------------------------------------------------------------
  719. int WindowHeight(WINDOW wnd)
  720. int WindowWidth(WINDOW wnd)
  721.  
  722. These functions return the window's height and width.
  723. -------------------------------------------------------------------
  724. int ClientWidth(WINDOW wnd)
  725. int ClientHeight(WINDOW wnd)
  726.  
  727. These functions return the height and width of the window's client
  728. area.
  729.  
  730. -------------------------------------------------------------------
  731. int GetTop(WINDOW wnd)
  732. int GetBottom(WINDOW wnd)
  733. int GetLeft(WINDOW wnd)
  734. int GetRight(WINDOW wnd)
  735.  
  736. These functions return the screen coordinates of the four corners of
  737. the window.
  738.  
  739. -------------------------------------------------------------------
  740. int GetClientTop(WINDOW wnd)
  741. int GetClientBottom(WINDOW wnd)
  742. int GetClientLeft(WINDOW wnd)
  743. int GetClientRight(WINDOW wnd)
  744.  
  745. These functions return the screen coordinates of the four corners of
  746. the window's client area.
  747.  
  748. -------------------------------------------------------------------
  749. WINDOW GetParent(WINDOW wnd)
  750.  
  751. Returns the parent of the window or NULL if the window has no
  752. parent.
  753.  
  754. -------------------------------------------------------------------
  755. WINDOW FirstWindow(wnd)
  756.  
  757. Returns the first child window that wnd is a parent of or NULL if
  758. wnd has no children.
  759.  
  760. -------------------------------------------------------------------
  761. WINDOW LastWindow(wnd) 
  762.  
  763. Returns the last child window that wnd is a parent of or NULL if
  764. wnd has no children.
  765.  
  766. -------------------------------------------------------------------
  767. WINDOW NextWindow(wnd)
  768.  
  769. Returns the next adjacent sibling window of wnd or NULL if wnd has no
  770. siblings.
  771.  
  772. -------------------------------------------------------------------
  773. WINDOW PrevWindow(wnd) 
  774.  
  775. Returns the previous adjacent sibling window of wnd or NULL if wnd
  776. has no siblings.
  777.  
  778. -------------------------------------------------------------------
  779. int CharInView(WINDOW wnd, int x, int y)
  780.  
  781. Returns true if the x/y character position, relative to the window,
  782. is in view (not clipped at the border of a parent window or the
  783. screen.
  784.  
  785. -------------------------------------------------------------------
  786. int TopBorderAdj(WINDOW wnd)
  787.  
  788. Returns the value to add to a y coordinate of the window's client
  789. area to make it relative to the window top.
  790.  
  791. -------------------------------------------------------------------
  792. int BorderAdj(WINDOW wnd)
  793.  
  794. Returns the value to add to an x coordinate relative to the window's
  795. client area to make it relative to the window's left edge.
  796.  
  797. -------------------------------------------------------------------
  798. char *GetTitle(WINDOW wnd)
  799.  
  800. Returns the address of a window's title, or NULL if the window has no
  801. title.
  802.  
  803. -------------------------------------------------------------------
  804. void AddTitle(WINDOW wnd, char *title)
  805.  
  806. Adds or changes the title to an existing window.
  807.  
  808. -------------------------------------------------------------------
  809. CLASS GetClass(WINDOW wnd)
  810.  
  811. Returns the class of the window.
  812.  
  813. -------------------------------------------------------------------
  814. int GetAttribute(WINDOW wnd)
  815.  
  816. Returns the attribute word of a window.
  817.  
  818. -------------------------------------------------------------------
  819. void AddAttribute(WINDOW wnd, int attrib)
  820.  
  821. Adds one or more attributes to a window. OR the attribute values
  822. together.
  823.  
  824. -------------------------------------------------------------------
  825. void ClearAttribute(WINDOW wnd, int attrib)
  826.  
  827. Clears one or more attributes from a window. OR the attribute values
  828. together.
  829.  
  830. -------------------------------------------------------------------
  831. int TestAttribute(WINDOW wnd, int attrib)
  832.  
  833. Tests one or more attributes in a window. Returns true if any of them
  834. are set. OR the attribute values together.
  835.  
  836. -------------------------------------------------------------------
  837. int isVisible(WINDOW wnd)
  838.  
  839. Returns true if the window is visible.
  840.  
  841. -------------------------------------------------------------------
  842. char *GetText(WINDOW wnd)
  843.  
  844. Returns the address of the text buffer for a TEXTBOX or derived
  845. window class.
  846.  
  847. -------------------------------------------------------------------
  848. int GetTextLines(WINDOW wnd)
  849.  
  850. Returns the number of text lines in a TEXTBOX or derived
  851. window class.
  852.  
  853. -------------------------------------------------------------------
  854. char *TextLine(WINDOW wnd, int line)
  855.  
  856. Returns the address of a specified line of text (0, 1, ...) in a
  857. TEXTBOX or derived class.
  858.  
  859. -------------------------------------------------------------------
  860. int isActive(MENU *mnu, int command)
  861.  
  862. Returns true if the command (commands.h) on the menu is active
  863. (enabled).
  864.  
  865. -------------------------------------------------------------------
  866. char *GetCommandText(MBAR *mn, int cmd)
  867.  
  868. Returns the address of a menu command's title text.
  869.  
  870. -------------------------------------------------------------------
  871. void ActivateCommand(MENU *mnu, int command)
  872. void DeactivateCommand(MENU *mnu, int command)
  873.  
  874. Activate (enable) or deactivate (disable) a command (commands.h) on a
  875. menu.
  876.  
  877. -------------------------------------------------------------------
  878. int GetCommandToggle(MENU *mnu, int command)
  879. void SetCommandToggle(MENU *mnu, int command)
  880. void ClearCommandToggle(MENU *mnu, int command)
  881. void InvertCommandToggle(MENU *mnu, int command)
  882.  
  883. Some menu commands are toggles rather than executors of processes. 
  884. Examples are the Insert and Word wrap commands on the Options menu.
  885. These functions get, set, clear, and invert the toggle setting for a
  886. specified command on a specified menu.
  887.  
  888. -------------------------------------------------------------------
  889. int ItemSelected(WINDOW wnd, int line)
  890.  
  891. This function returns true if the specified item (0, 1, ...) on a
  892. multiple-line selection listbox is selected.
  893.  
  894. -------------------------------------------------------------------
  895. int DialogBox(
  896.   WINDOW wnd,        /* parent window of the dialog box        */
  897.   DBOX *db,          /* address of dialog box definition array */
  898.   int Modal,         /* true if it is a modal dialog box       */
  899.   int (*wndproc)(struct window *, MESSAGE, PARAM, PARAM)
  900.                      /* the window processing function or NULL */
  901. )
  902.  
  903. This function executes a dialog box. If it is a modal dialog box, the
  904. function does not return until the user completes the dialog box. The
  905. return value will be true if the user has selected OK and false if
  906. the user has selected Cancel on the dialog box. If the dialog box is
  907. modeless, the function returns immediately, and the user can select
  908. other things from the screen while the dialog box is still active.
  909.  
  910. -------------------------------------------------------------------
  911. WINDOW ControlWindow(DBOX *db, enum commands cmd)
  912.  
  913. This function returns the WINDOW handle of the control specified by
  914. the cmd parameter.
  915. -------------------------------------------------------------------
  916. void MessageBox(char *title, char *message)
  917. void CancelBox(wnd, char *message)
  918. void ErrorMessage(char *message)
  919. int TestErrorMessage(char *message)
  920. int YesNoBox(char *question)
  921. WINDOW MomentaryMessage(char *message)
  922.  
  923. These functions display generic message boxes. The message text is
  924. one null-terminated string with newlines (\n) to indicate where lines
  925. are to be broken. The size of the boxes adjusts to the width of the
  926. longest line and the number of lines of text. A message may have no
  927. more lines of text than will fit into the largest window that the
  928. screen can display. You must account for the window's border's and
  929. the presence at the bottom of one or more command buttons.
  930.  
  931. The MessageBox function displays a message in a window with a title
  932. provided by the caller. The window contains the message and an OK
  933. command button.
  934.  
  935. The CancelBox function displays a message in a window with a
  936. "Wait..." title. The window contains the message and a Cancel command
  937. button. If the user presses the Cancel button before the program
  938. closes the window, the COMMAND, ID_CANCEL message is sent to the
  939. parent window.
  940.  
  941. The ErrorMessage function displays the message in an error box window
  942. with an OK command button.
  943.  
  944. The TestErrorMessage function is an error message with OK and Cancel
  945. command buttons. The function returns true if the user selects OK or
  946. presses Enter and false if the user selects Cancel or presses Esc.
  947.  
  948. The YesNoBox function displays the message with Yes and No command
  949. buttons. The function returns true if the user selects Yes or
  950. presses Enter and false if the user selects No or presses Esc.
  951.  
  952. The MomentaryMessage function displays a message box and returns its
  953. WINDOW handle. The caller must close the window. The purpose of this
  954. function is to allow you to display a message while some time
  955. consuming process is underway and then erase the message after the
  956. process is done but without any action required from the user.
  957.  
  958. -------------------------------------------------------------------
  959. int InputBox(WINDOW wnd, char *ttl, char *msg, char *text, int len, int wd)
  960.  
  961. This function executes a generic one-line user input dialog box. The
  962. wnd parameter is the parent window of the dialog box. The ttl
  963. parameter points to a title string for the dialog box. The msg
  964. parameter points to a prompting text message. The text parameter
  965. points to the string that will receive the user's input. The len
  966. parameter is the length of the input string not including the null
  967. terminator. The wd parameter is the width of the string display. If
  968. the wd parameter is 0, the function computes a width based on the len
  969. parameter.
  970.  
  971. The function returns a true value if the user chooses the OK command
  972. button and false if the user selects Cancel.
  973.  
  974. -------------------------------------------------------------------
  975. WINDOW SliderBox(int len, char *ttl, char *msg)
  976.  
  977. This function displays a dialog box with the specified title and
  978. message, a slider bar of the specified length, and a Cancel button.
  979. The slider bar displays a percent value.
  980.  
  981. You use the slider box to display feedback to the user when the
  982. program is doing a time-consuming task, such as printing a file.
  983. Periodically, through your process, you send a PAINT message to the
  984. window handle that the SliderBox function returns. The second
  985. parameter is the new percent value. When you have sent 100, the
  986. slider dialog box closes itself. If the user chooses the Cancel
  987. command on the dialog box, your next PAINT message returns FALSE.
  988. Otherwise it returns TRUE.
  989.  
  990. -------------------------------------------------------------------
  991. int RadioButtonSetting(DBOX *db, enum commands cmd)
  992.  
  993. This function returns true if the specified command on the specified
  994. dialog box is a pressed radio button.
  995.  
  996. -------------------------------------------------------------------
  997. void EnableButton(DBOX *db, enum commands cmd)
  998.  
  999. This function enables a command button on a dialog box. command
  1000. buttons are initially enabled when the dialog box is first opened.
  1001.  
  1002. -------------------------------------------------------------------
  1003. void DisableButton(DBOX *db, enum commands cmd)
  1004.  
  1005. This function disables a command button on a dialog box. command
  1006. buttons are initially enabled when the dialog box is first opened.
  1007.  
  1008. -------------------------------------------------------------------
  1009. void PushRadioButton(DBOX *db, enum commands cmd)
  1010.  
  1011. This function presses the specified radio button command on the
  1012. specified dialog box.
  1013.  
  1014. -------------------------------------------------------------------
  1015. void PutItemText(WINDOW wnd, enum commands cmd, char *text)
  1016.  
  1017. This function appends a line of text to a TEXT, TEXTBOX, EDITBOX,
  1018. LISTBOX, SPINBUTTON, or COMBOBOX control window in a dialog box. The
  1019. wnd parameter is the WINDOW handle of the dialog box. The cmd
  1020. parameter specifies the command associated with the control item. The
  1021. text parameter points to the text to be added. The control window
  1022. makes its own copy of the text, so the caller's copy can go out of
  1023. scope.  If the control window is a COMBOBOX, TEXTBOX, or EDITBOX
  1024. window, you must send a PAINT message to the control window so that
  1025. the new text will display.
  1026.  
  1027. You must call this function while the dialog box is active. That
  1028. means that if the dialog box is modal, you must call this function
  1029. from within a custom window processing function that you supply when
  1030. you call DialogBox.
  1031.  
  1032. -------------------------------------------------------------------
  1033. void PutComboListText(WINDOW wnd, enum commands cmd, char *text)
  1034.  
  1035. This function appends a line of text to the LISTBOX of a COMBOBOX
  1036. control window in a dialog box. The wnd parameter is the WINDOW
  1037. handle of the dialog box. The cmd parameter specifies the command
  1038. associated with the combo box. The text parameter points to the
  1039. text to be added. The control window makes its own copy of the text,
  1040. so the caller's copy can go out of scope.
  1041.  
  1042. You must call this function while the dialog box is active. That
  1043. means that if the dialog box is modal, you must call this function
  1044. from within a custom window processing function that you supply when
  1045. you call DialogBox.
  1046.  
  1047. -------------------------------------------------------------------
  1048. void GetItemText(WINDOW wnd, enum commands cmd, char *text, int length)
  1049.  
  1050. This function copies the text from a TEXT, TEXTBOX, COMBOBOX, or
  1051. EDITBOX control window in a dialog box. The wnd parameter is the
  1052. WINDOW handle of the dialog box. The cmd parameter specifies the
  1053. command associated with the control item. The text parameter points
  1054. to the caller's buffer where the text will be copied. The length
  1055. parameter specifies the maximum number of characters to copy.
  1056.  
  1057. You must call this function while the dialog box is active. That
  1058. means that if the dialog box is modal, you must call this function
  1059. from within a custom window processing function that you supply when
  1060. you call DialogBox.
  1061.  
  1062. -------------------------------------------------------------------
  1063. char *GetEditBoxText(DBOX *db, enum commands cmd)
  1064.  
  1065. This function returns a pointer to the text associated with an
  1066. editbox control in a dialog box. You can call it after the dialog box
  1067. has completed processing. The buffer is on the heap. Do not free it.
  1068. Instead, call SetEditBoxText with a NULL pointer.
  1069.  
  1070. If the text has not changed since it was initialized, this function
  1071. returns NULL.
  1072.  
  1073. -------------------------------------------------------------------
  1074. char *GetComboBoxText(DBOX *db, enum commands cmd)
  1075.  
  1076. This function returns a pointer to the text associated with an
  1077. combo box control in a dialog box. You can call it after the dialog box
  1078. has completed processing. The buffer is on the heap. Do not free it.
  1079. Instead, call SetEditBoxText with a NULL pointer.
  1080.  
  1081. If the text has not changed since it was initialized, this function
  1082. returns NULL.
  1083.  
  1084. -------------------------------------------------------------------
  1085. void SetEditBoxText(DBOX *db, enum commands cmd, char *text)
  1086.  
  1087. This function sets the text of a dialog box editbox. You can call
  1088. this function before or while the dialog box is open. The dialog box
  1089. makes it own copy on the heap, so your text can go out of scope.
  1090.  
  1091. -------------------------------------------------------------------
  1092. void SetComboBoxText(DBOX *db, enum commands cmd, char *text)
  1093.  
  1094. This function sets the text of a dialog box combo box. You can call
  1095. this function before or while the dialog box is open. The dialog box
  1096. makes it own copy on the heap, so your text can go out of scope.
  1097.  
  1098. -------------------------------------------------------------------
  1099. char *GetDlgText(DBOX *db, enum commands cmd, char *text)
  1100.  
  1101. Similar to GetEditBoxText except that it works with text controls.
  1102.  
  1103. -------------------------------------------------------------------
  1104. char *SetDlgText(DBOX *db, enum commands cmd, char *text)
  1105.  
  1106. Similar to SetEditBoxText except that it works with text controls.
  1107.  
  1108. -------------------------------------------------------------------
  1109. char *GetDlgTextBox(DBOX *db, enum commands cmd, char *text)
  1110.  
  1111. Similar to GetEditBoxText except that it works with textbox controls.
  1112.  
  1113. -------------------------------------------------------------------
  1114. char *SetDlgTextBox(DBOX *db, enum commands cmd, char *text)
  1115.  
  1116. Similar to SetEditBoxText except that it works with textbox controls.
  1117.  
  1118. -------------------------------------------------------------------
  1119. void SetCheckBox(DBOX *db, enum commands cmd)
  1120. void ClearCheckBox(DBOX *db, enum commands cmd)
  1121. int CheckBoxSetting(DBOX *db, enum commands cmd)
  1122.  
  1123. These functions set, clear, and test the setting of a specified check
  1124. box control item on a dialog box.
  1125.  
  1126. -------------------------------------------------------------------
  1127. void SetDlgTitle(DBOX *db, char *ttl)
  1128.  
  1129. This function changes the specified dialog box's title.
  1130. -------------------------------------------------------------------
  1131. void LoadHelpFile(char *apname);
  1132.  
  1133. This function loads the help file. The apname parameter points to 
  1134. the helpfile name without the .hlp extension.
  1135.  
  1136. Call this function at the beginning of an application program or to
  1137. change the help file midstream.
  1138.  
  1139. -------------------------------------------------------------------
  1140. void DisplayHelp(WINDOW wnd, char *Help)
  1141.  
  1142. Display the help window identified by the Help parameter. See the
  1143. comments in memopad.txt for the format of a help database. You can
  1144. get the same effect by sending the DISPLAY_HELP message with a
  1145. pointer to the Help string as the first parameter after the message
  1146. id.
  1147.  
  1148. -------------------------------------------------------------------
  1149. char *HelpComment(char *Help)
  1150.  
  1151. Retrieve a pointer to the comment text associated with the specified
  1152. Help parameter.
  1153.  
  1154. -------------------------------------------------------------------
  1155. void UnLoadHelpFile(void);
  1156.  
  1157. Call this function at the end of a D-Flat application to free the
  1158. memory used by a help file.
  1159.  
  1160. -------------------------------------------------------------------
  1161. void SearchText(WINDOW wnd)
  1162.  
  1163. Opens a dialog box for the user to enter a search string. Searches
  1164. the wnd TEXTBOX for a match on the string.
  1165.  
  1166. -------------------------------------------------------------------
  1167. void ReplaceText(WINDOW wnd)
  1168.  
  1169. Opens a dialog box for the user to enter search and replacement
  1170. strings. Searches the wnd TEXTBOX for a match on the string and
  1171. replaces it if found. The dialog box includes an option to replace
  1172. all matches.
  1173.  
  1174. -------------------------------------------------------------------
  1175. void SearchNext(WINDOW wnd)
  1176.  
  1177. Assumes that a previous SearchText call has found a match. Searches
  1178. for the next match of the same string in the specified EDITBOX
  1179. window.
  1180.  
  1181. -------------------------------------------------------------------
  1182. void WriteTextLine(WINDOW wnd, RECT *rcc, int y, int reverse)
  1183.  
  1184. This function displays a text line from a TEXTBOX or derived window
  1185. class. The text has already been added to the window with ADDTEXT,
  1186. etc. The y parameter specifies which line (0, 1, ...) relative to the
  1187. window's text buffer to display. If the specified line is not in
  1188. view, the function does nothing. If the reverse parameter is true,
  1189. the line displays in the reverse-video colors of the window. The rcc
  1190. RECT pointer is usually NULL for applications calls. It points to a
  1191. rectangle relative to the window outside of which displays will not
  1192. occur. 
  1193.  
  1194. -------------------------------------------------------------------
  1195. void PutWindowLine(WINDOW wnd, void *s, int x, int y)
  1196.  
  1197. This function writes a line of text to a window. The x and y
  1198. coordinates point to the first character in the window's client area
  1199. where the line is to be written. The text must be null-terminated.
  1200. This function clips the line if it goes beyond the window or the
  1201. screen. The function clips the line if it goes outside the borders of
  1202. the window's parent. If other windows overlap the target window, the
  1203. text is clipped. Do not use negative values in x or y.
  1204.  
  1205. You can assign color values to the global variables foreground and
  1206. background to affect the color of the line's display.
  1207.  
  1208. -------------------------------------------------------------------
  1209. void PutWindowChar(WINDOW wnd, int c, int x, int y)
  1210.  
  1211. This function writes the character c to a window. The x and y
  1212. coordinates are relative to the window's client area.
  1213.  
  1214. The function performs clipping. If the character is beyond the
  1215. window's or the screen's borders it is not written. If the window
  1216. does not have the NOCLIP attribute, the character is not written if
  1217. its coordinates are beyond the margins of its parent window (if the
  1218. window has a parent). If other windows overlap the target window, the
  1219. text is clipped. Do not use negative values in x or y.
  1220.  
  1221. You can assign color values to the global variables foreground and
  1222. background to affect the color of the character's display.
  1223.  
  1224. -------------------------------------------------------------------
  1225. void DrawVector(WINDOW wnd, int x, int y, int len, int hv)
  1226.  
  1227. Draw a horizontal vector in a picture box. x and y are character
  1228. coordinates relative to the starting position of the vector. len is
  1229. the length. hv is TRUE for a horizontal vector and FALSE for a
  1230. vertical vector. Sends a DRAWVECTOR message to the window.
  1231.  
  1232. Send a PAINT message to the window to display the vectors.
  1233.  
  1234. -------------------------------------------------------------------
  1235. void DrawBox(WINDOW wnd, int x, int y, int ht, int wd)
  1236.  
  1237. Draw a box in a picture box. x and y are character coordinates
  1238. relative to the upper left corner of the box. ht and wd are the
  1239. height and width of the box. Sends a DRAWBOX message to the window.
  1240.  
  1241. Send a PAINT message to the window to display the box.
  1242.  
  1243. -------------------------------------------------------------------
  1244. void DrawBar(WINDOW wnd, enum VectTypes vt, int x, int y, int len, int hv)
  1245.  
  1246. Draw a graph bar in a picture box. vt is one of the following values
  1247. to specify the character box used to display the bar: SOLIDBAR,
  1248. HEAVYBAR, CROSSBAR, LIGHTBAR. x and y are character coordinates
  1249. relative to the starting position of the bar. len is the length. hv
  1250. is TRUE for a horizontal bar and FALSE for a vertical bar. Sends a
  1251. DRAWBAR message to the window.
  1252.  
  1253. Send a PAINT message to the window to display the bars.
  1254.  
  1255. -------------------------------------------------------------------
  1256. void WindowClientColor(WINDOW wnd, int fg, int bg)
  1257.  
  1258. Changes the window client space's foreground and background colors.
  1259. -------------------------------------------------------------------
  1260. void WindowReverseColor(WINDOW wnd, int fg, int bg)
  1261.  
  1262. Changes the window's foreground and background reverse colors, which
  1263. are used to display such things as selected text blocks.
  1264. -------------------------------------------------------------------
  1265. void WindowFrameColor(WINDOW wnd, int fg, int bg)
  1266.  
  1267. Changes the window's foreground and background frame colors.
  1268. -------------------------------------------------------------------
  1269. void WindowHighlightColor(WINDOW wnd, int fg, int bg)
  1270.  
  1271. Changes the window's foreground and background highlight colors,
  1272. which are used to display highlighted items such as menu selector
  1273. bars.
  1274. -------------------------------------------------------------------
  1275. void MarkTextBlock(WINDOW wnd, int BegLine, int BegCol,
  1276.                                int EndLine, int EndCol)
  1277.  
  1278. Marks a block in the specified TEXTBOX window.
  1279.  
  1280. -------------------------------------------------------------------
  1281. void ClearTextBlock(WINDOW wnd)
  1282.  
  1283. Unmarks a marked block in the specified TEXTBOX window.
  1284.  
  1285. -------------------------------------------------------------------
  1286. void CopyToClipboard(WINDOW wnd)
  1287.  
  1288. Copies the marked block from the WINDOW into the Clipboard.
  1289.  
  1290. -------------------------------------------------------------------
  1291. void CopyTextToClipboard(char *string)
  1292.  
  1293. Copies a null-terminated string into the Clipboard.
  1294.  
  1295. -------------------------------------------------------------------
  1296. void PasteFromClipboard(WINDOW wnd)
  1297.  
  1298. Pastes the Clipboard's contents into the specified EDITBOX window at
  1299. the current cursor location.
  1300.  
  1301. -------------------------------------------------------------------
  1302. void ClearClipboard(void)
  1303.  
  1304. Clears the clipboard and frees the memory allocated for it. Called by
  1305. D-Flat when message processing terminates. 
  1306.  
  1307. -------------------------------------------------------------------
  1308. WINDOW WatchIcon(void)
  1309.  
  1310. Displays a wristwatch icon on the screen. The icon has control of the
  1311. keyboard and mouse. You must send the CLOSE_WINDOW message to the
  1312. WINDOW handle that WatchIcon returns to get rid of the icon.
  1313.  
  1314. Use this icon to tell the user to please stand by during long
  1315. processes. Call handshake frequently during these processes to
  1316. update the date display in the status bar and to allow the watch icon
  1317. to move when the user moves the mouse.
  1318.  
  1319. -------------------------------------------------------------------
  1320. Configurable Items
  1321.  
  1322. Global Symbol File      Value Description
  1323. ------------- --------- ----- ---------------------------------------
  1324. MAXMESSAGES   DFLAT.H    50   Maximum D-Flat messages queued
  1325. MAXCONTROLS   DIALBOX.H  26   Maximum Controls on a dialog box
  1326. MAXRADIOS     DIALBOX.H  20   Maximum radio buttons in a group
  1327. MAXSAVES      SYSTEM.H   50   Maximum cursor saves
  1328. MAXPULLDOWNS  MENU.H     15   Maximum number of pull-down menus on
  1329.                               a menu bar (including cascading menus)
  1330. MAXSELECTIONS MENU.H     15   Maximum number of selections on 
  1331.                               a pull-down menu (includes separators)
  1332. MAXCASCADES   MENU.H      3   Maximum nesting level of cascaded menus
  1333. MAXTEXTLEN    DFLAT.H 65000   Maximum text buffer
  1334. EDITLEN       DFLAT.H  1024   Starting length for multiline EDITBOX
  1335. ENTRYLEN      DFLAT.H   256   Starting length for single-line EDITBOX
  1336. GROWLENGTH    DFLAT.H    64   EDITBOX buffers grow by this much
  1337.  
  1338.  
  1339.